package piece;

import java.util.ArrayList;
import java.util.List;
import object.Piece;
import static object.Piece.SQUARE_BORDER;
import object.Square;
//L2
public class PieceJ extends Piece {

    public PieceJ(int image) {
        //第一种变化
        List<Square> squares0 = new ArrayList<>();
        squares0.add(new Square(image, SQUARE_BORDER, 0));
        squares0.add(new Square(image, SQUARE_BORDER, SQUARE_BORDER));
        squares0.add(new Square(image, 0, SQUARE_BORDER * 2));
        squares0.add(new Square(image, SQUARE_BORDER, SQUARE_BORDER * 2));
        //第二种变化
        List<Square> squares1 = new ArrayList<>();
        squares1.add(new Square(image, 0, 0));
        squares1.add(new Square(image, 0, SQUARE_BORDER));
        squares1.add(new Square(image, SQUARE_BORDER, SQUARE_BORDER));
        squares1.add(new Square(image, SQUARE_BORDER * 2, SQUARE_BORDER));
        //第三种变化
        List<Square> squares2 = new ArrayList<>();
        squares2.add(new Square(image, 0, 0));
        squares2.add(new Square(image, SQUARE_BORDER, 0));
        squares2.add(new Square(image, 0, SQUARE_BORDER));
        squares2.add(new Square(image, 0, SQUARE_BORDER * 2));
        //第四种变化
        List<Square> squares3 = new ArrayList<>();
        squares3.add(new Square(image, 0, 0));
        squares3.add(new Square(image, SQUARE_BORDER, 0));
        squares3.add(new Square(image, SQUARE_BORDER * 2, 0));
        squares3.add(new Square(image, SQUARE_BORDER * 2, SQUARE_BORDER));
        super.changes.add(squares0);
        super.changes.add(squares1);
        super.changes.add(squares2);
        super.changes.add(squares3);
        super.setSquares(getDefault());
    }
}
